<template>
<div>
    <!-- 面包屑 -->
    <el-bread></el-bread>
    <!-- 添加按钮 -->
    <el-button class="btn" type="primary" size="mini" plain @click="add">添加</el-button>
    <!-- 表格 -->
    <List @edit="edit"></List>
    <!-- 弹框 -->
    <Dialog :bannerstatus="bannerstatus" @cancel="cancel" ref="diaRef"></Dialog>
</div>
</template>
<script>
import Dialog from './dialog.vue'
import List from './list.vue'
export default {
data() {
return {
    bannerstatus:{
        isShow:false,
        isAdd:true
    }
}
},
methods: {
    add(){
        this.bannerstatus.isShow = true
        this.bannerstatus.isAdd = true
    },
    cancel(e){
        this.bannerstatus.isShow=e
    },
    edit(id){
        this.bannerstatus.isShow = true
        this.bannerstatus.isAdd = false
        this.$refs.diaRef.lookup(id)
    }
},
mounted() {},
watch: {},
computed: {},
filters: {},
components: {Dialog,List}
}
</script>
<style scoped>
.btn{
    margin: 10px;
}
</style>